package com.platform.data.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.platform.base.domain.BaseLocation;
import com.platform.common.annotation.Excel;
import com.platform.common.annotation.Excels;
import com.platform.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;

/**
 * 阀门采集数据对象 valve_data
 * 
 * @author wangqi
 * @date 2020-09-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("unit_valve_data")
public class UnitValveData extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键id */
    @TableId(type = IdType.AUTO)
    private Long id;

    /** 阀门ID */
    @NotBlank(message = "阀门ID不能为空")
    @Excel(name = "阀门ID")
    private String valveId;

    /** 温度上限 */
    @Excel(name = "设置开度")
    private String saperture;

    /** pid参数是否远程修改 */
    @Excel(name = "pid参数是否远程修改")
    private String pidS;

    /** 当前温度 */
    @Excel(name = "当前温度")
    private String temp;

    /** 设置温度 */
    @Excel(name = "设置温度")
    private String pidSetv;

    /** pid功能是否开启 */
    @Excel(name = "pid功能是否开启")
    private String work;

    /** 当前开度 */
    @Excel(name = "当前开度")
    private String aperture;


    /** pid_kp */
    @Excel(name = "pid_kp")
    private String pidKp;
    /** pid_ki */
    @Excel(name = "pid_ki")
    private String pidKi;
    /** pid_kd */
    @Excel(name = "pid_kd")
    private String pidKd;
    /** 采样周期 */
    @Excel(name = "采样周期")
    private String pidKt;

    /** 阀门精度 */
    @Excel(name = "阀门精度")
    private String pidDead;

    /** 作用方向 */
    @Excel(name = "作用方向")
    private String pidAct;

    /** 地址信息 */
    @Excels({
            @Excel(name = "地址全称", targetAttr = "locationName"),
            @Excel(name = "地址代码", targetAttr = "locationId", type = Excel.Type.EXPORT)
    })
    @TableField(exist = false)
    private BaseLocation location;
    /** 地址id */
    @TableField(exist = false)
    private String locationId;
    /** 地址id */
    @TableField(exist = false)
    private String locationName;

    /** netty数据 */
    @TableField(exist = false)
    private String datas;
    /** 状态 */
    @Excel(name = "阀门状态")
    private String status;
}
